$OpenBSD: patch-Makefile,v 1.4 2005/01/25 06:57:45 matthieu Exp $
--- Makefile.orig	Sat Dec 28 15:38:05 2002
+++ Makefile	Sun Jan  9 10:26:36 2005
@@ -2,12 +2,12 @@
 # $Id: patch-Makefile,v 1.4 2005/01/25 06:57:45 matthieu Exp $
 #
 
-BINDIR = /usr/local/bin
-MANDIR = /usr/local/man/man8
+BINDIR ?= ${PREFIX}/bin
+MANDIR ?= ${PREFIX}/man/man8
 
-CC	= gcc
+CC	?= cc
 # XPG3 regular expressions (GNU/BSD/SVR4)
-CFLAGS	= -Wall -O -DUSE_REGEXP
+CFLAGS	+= -DUSE_REGEXP
 # Others
 #CFLAGS	= -Wall -O
 
@@ -16,7 +16,7 @@ PROG	= sma
 OBJS    = sma.o getopt.o parse.o utils.o hash.o html.o ascii.o init.o
 
 $(PROG): $(OBJS)
-	$(CC) $(CFLAGS) -o $(PROG) $(OBJS) 
+	$(CC) $(LDFLAGS) -o $(PROG) $(OBJS) 
 	cp docs/$(MAN) .
 
 clean:
